Subject: Re: Amiga doesn't pre-emptive multitask? (...)
From: [email-masked] (Peter Cherna)
Date: 22 Oct 92 13:36:40 GMT
Newsgroups: comp.sys.amiga.programmer

In article <[email-masked]> [email-masked] (Pete Goodeve) writes:
>Just to make sure I hadn't missed it the first time, I went back to FindPort
>again, and I stand by my statement that it has *no* protection.  Somebody
>prove me wrong, please...

FindPort() is missing protection prior to V39.  FindPort() protects itself
properly in V39 and up.  Note:  this does not protect the RESULT after
the return from FindPort(), so you still need some protection if you
expect to PutMsg() to that port.  That protection could be Forbid()/Permit(),
or any other higher-level protocol.  Such a protocol would by any kind
of guarantee that a named port won't vanish on you.  For example, if
a library opens a port when it is first opened, and deletes it when it
is last closed, then holding the library open is all the protocol you
need to guarantee the persistence of that port from the time you FindPort()
it until you're done with it.

>                                            -- Pete --

     Peter
--
Peter Cherna, User Interface Development Group, Commodore-Amiga, Inc.
{uunet|rutgers}!cbmvax!peter    [email-masked]
My opinions do not necessarily represent the opinions of my employer.
"I believe it's bad luck to be superstitious."